#ifndef DPU_H
#define DPU_H

#include "drv_dpu.h"
#include "mm_config.h"
#include <stdint.h>
#include "lcd.h"
//#include "ui_task/lvgl_app/gui_user.h"

#define DPULAYER_USECASE0 


#ifndef SRC_ADR
#define SRC_ADR   	         MM_IMG_ISP0_BUF0     //Original picture
#endif
#ifndef DST_ADR
#define	DST_ADR              MM_IMG_FOR_DPU    //show   16M
#endif

// #ifndef LV_HOR_RES_MAX
// #define LV_HOR_RES_MAX         240
// #endif

// #ifndef LV_VER_RES_MAX
// #define LV_VER_RES_MAX         320
// #endif

typedef enum BackGroundType_e
{
    BACK_GROUND_VERIFY_SUCCESS  = 0,                   /**< invalid (could be zeroed memory) */
    BACK_GROUND_NO_FACE,
    BACK_GROUND_VERIFY_FAILED
} BackGroundType_t;


/**
  \brief       dpu init
  \param[in]   timing, timing parameters of lcd
  \param[in]   polarity, signal polarity config. if lcd interface is DPI, config
  \                 polarity according of lcd. if lcd interface is MIPI, the polarity
  \                 is fixed(all ACTIVE_HIGH)
  \param[in]   en_ch_msk, channel mask, there are 3 channels.
  \return      error code
*/
int dpu_init(EM_LCD_TYPE lcd_type);


/**
  \brief       dpu layer config
  \param[in]   layer_id, 0-3
  \param[in]   layer_cfg, layer config.
  \return      error code
*/
int dpu_layer_config(uint8_t layer_id, dpu_layer_cfg_t *layer_cfg);


void dpu_layer0_Set_Background_Picture(uint8_t bg_picture_id);

#define FEATURE_EG_360_SHOW_PICTURE_WITH_DPU_LAYER2 1

#if FEATURE_EG_360_SHOW_PICTURE_WITH_DPU_LAYER2
void dpu_layer2_Set_Picture(uint8_t bg_picture_id);
#endif

void dpu_layer_extra_config(void);

#endif


















